package router

import (
	global "yundata-service/internal"
	auth "yundata-service/pkg/api/auth"

	"github.com/gin-gonic/gin"
)

func InitMenuRouter(e *gin.Engine) {
	// token验证
	e.Use(CheckToken())

	nodeAction := auth.NodeAction{}
	nodeAction.ActionModel = global.ActionModel{}
	e.Use(ActionMiddleware(&nodeAction.ActionModel))

	// 菜单
	menuRouterGroup := e.Group("/api/menu", func(ctx *gin.Context) {})
	{
		menuRouterGroup.POST("/index", func(ctx *gin.Context) {
			nodeAction.GetTree()
		})
	}
}
